<nav aria-label="breadcrumb">
    <ol class="breadcrumb fw-lighter">
      <li class="breadcrumb-item"><a href="/" class="link-underline-light"><small>首页</small></a></li>
<?php
if(is_string($breadcrumb)){
    $breadcrumb = str2arr($breadcrumb);
} 
foreach($breadcrumb as $b){ 
    if(is_string($b)){
        $b=str2arr($b,'|');
    }
    $title = $b[0];
    $url = $b[1]??'';    
    if(!empty($title)){
        if($url){
            echo "<li class='breadcrumb-item'><a href='$url' class='link-underline-light'><small>".htmlspecialchars($title)."</small></a></li>".PHP_EOL;
        }else{
            echo "<li class='breadcrumb-item'><small>".htmlspecialchars($title)."</small></li>".PHP_EOL;
        }
    }
} 
?>
    </ol>
</nav>
